﻿@page "/uploadTest"

@using IP2Region.Net.XDB;
@using North.Core.Entities
@using North.Core.Helpers
@using North.Events.PasteMultimediaEvent
@using System.Reflection.Metadata
@using System.Diagnostics
@using North.RCL.Forms
@using System.Reflection
@using System.Text.Json

@inject ILogger _logger
@inject IJSRuntime _js
@inject ISnackbar _snackbar
@inject IDialogService _dialog
@inject IHttpContextAccessor _accessor
@inject ISearcher _ipSearcher

Device: @DeviceInfo

Version: @Version

<MudButton OnClick="async () => {
    DeviceInfo = JsonSerializer.Serialize(await _js.GetDeviceInfoAsync());
    // TODO 获取系统版本号
    Version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
}">Click Me!</MudButton>

@code{
    private string DeviceInfo { get; set; } = string.Empty;
    private string Version { get; set; } = string.Empty;
}